package com.linshengjian.snowball.core.controller;

import com.linshengjian.snowball.utils.ObjectConvertUtils;

public class BaseForm {
    public <T> T translate(Class<T> clazz) throws Exception {
        T model = clazz.newInstance();
        return ObjectConvertUtils.getInstance().assign(model, this, false, true, false);
    }

    public BaseForm assign(Object obj) throws Exception {
        ObjectConvertUtils.getInstance().assign(this, obj, true, false, true);
        return this;
    }
}
